// Table 6. Robustness checks foreign versus domestic firms
use "eseewithinfirm.dta", clear

local filename "table6"
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir i.catyr  , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word replace label  nocons dec(3)  sortvar(longinvXdomfir crisisXlonginvXdomfir)
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir i.catyr if  corpgrp==1, fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3)  sortvar(longinvXdomfir crisisXlonginvXdomfir)
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir i.catyr   [aw=ipw] , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3)  sortvar(longinvXdomfir crisisXlonginvXdomfir)
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir crisisXlonginvXsize longinvXsize i.catyr , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3)  sortvar(longinvXdomfir crisisXlonginvXdomfir longinvXsize crisisXlonginvXsize) 
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir crisisXlonginvXprod longinvXprod i.catyr , fe cluster(firmid indyear) partial(i.catyr) 
outreg2 using "`filename'", word  label  nocons dec(3)  sortvar(longinvXdomfir crisisXlonginvXdomfir longinvXsize crisisXlonginvXsize longinvXprod crisisXlonginvXprod) 

